package com.isoft.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 共享航班信息表-存储代码共享航班信息
 * @TableName SHARED_FLIGHTS
 */
@TableName(value ="SHARED_FLIGHTS")
@Data
public class SharedFlights implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Long SHARE_ID;

    /**
     *
     */
    private Long FLIGHT_ID;

    /**
     * 共享航空公司二字码
     */
    private String SFAW;

    /**
     * 共享航班号
     */
    private String SFNO;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SharedFlights other = (SharedFlights) that;
        return (this.getSHARE_ID() == null ? other.getSHARE_ID() == null : this.getSHARE_ID().equals(other.getSHARE_ID()))
                && (this.getFLIGHT_ID() == null ? other.getFLIGHT_ID() == null : this.getFLIGHT_ID().equals(other.getFLIGHT_ID()))
                && (this.getSFAW() == null ? other.getSFAW() == null : this.getSFAW().equals(other.getSFAW()))
                && (this.getSFNO() == null ? other.getSFNO() == null : this.getSFNO().equals(other.getSFNO()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSHARE_ID() == null) ? 0 : getSHARE_ID().hashCode());
        result = prime * result + ((getFLIGHT_ID() == null) ? 0 : getFLIGHT_ID().hashCode());
        result = prime * result + ((getSFAW() == null) ? 0 : getSFAW().hashCode());
        result = prime * result + ((getSFNO() == null) ? 0 : getSFNO().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", SHARE_ID=").append(SHARE_ID);
        sb.append(", FLIGHT_ID=").append(FLIGHT_ID);
        sb.append(", SFAW=").append(SFAW);
        sb.append(", SFNO=").append(SFNO);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}